<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="Author" content="ZhangBin">
    <meta name="Keywords" content="贪吃蛇,JS,原生JS,javascript,原生JS贪吃蛇">
    <meta name="Description" content="">
    <title>原生JS贪吃蛇</title>
    <link rel="shortcut icon" href="/static/img/Head.png" type="image/x-icon"/>
    <link href="css/index.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="bagr">
    <img src="http://demo.zhangbin.xin/ysjs_tcs/images/bg3.jpg"/>
</div>
<marquee>不要贪吃哦！</marquee>
<div class="box">
    <canvas id="canvas" width="600" height="600"></canvas>
</div>
<div class="score">
    <p id="score_msg">得分：<span id="score_num" style="color:red;font-weight:800;">0</span></p>
</div>
<div class="btn">
    <div id="start" onclick="startGame();" value="1">开始游戏</div>
    <div id="replay" onclick="replay();">重新开始</div>
</div>
<div class="audio">
    <audio src="mp3/bag.mp3" autoplay="autoplay" loop="loop"></audio>
    <audio src="mp3/btn1.mp3" id="start_btn"></audio>
    <audio src="mp3/dead.wav" id="dead"></audio>
    <audio src="mp3/eat.wav" id="eat"></audio>
</div>
<div class="game_desc">
		<pre>
			游戏提示：
			  1.通过上、下、左、右键控制蛇的移动
			  2.蛇撞到墙上游戏结束
			  3.蛇吃自己游戏结束
		</pre>
</div>
<script type="text/javascript" src="js/index.js"></script>
</body>
</html>
